<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="vue">
    <div>{{info.name}}</div>
    <div>{{info.age}}</div>
    <a v-bind:href="info.url">点我</a>
</div>

<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<script type="text/javascript">
    var vm=new Vue({
        el: "#vue",

        /* 之前data:  是属性   这个是data方法 是mounted（）返回来的数据  一样可以被使用*/
        data(){
            return{
                info:{
                    name:  null,
                    age: null,
                    url: null,
                }
            }
        },
        mounted(){
            axios.get("../data.json").then(response=>(this.info=response.data))
        }

    });
</script>
</body>
</html>